<?
define(APP_ROOT, realpath(dirname(__FILE__).'/..').'/');
$ROOT = APP_ROOT;

$type = $_GET['type'];
$name = $_GET['name'];
$mime = $_GET['mime'];

include APP_ROOT."library/_load.php";

$typetable = array(
	'layout'=> "$tpLayoutDir/%s/style.css",
	'page'=> "$tpPageDir/%s.css",
);

if ( $mime )
	header('Content-type: '.$mime);

readfile(sprintf(APP_ROOT.$typetable[$type], $name));
